home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / startup_dosarg.ass < prev    next >
Encoding:
Text File  |  1980-12-11  |  500 b   |  26 lines

  1. _START    move.l    a0,_arg
  2.     clr.b    (-1,a0,d0.w)
  3.     move.l    $4.w,a6
  4.     lea    (DOSName,pc),a1
  5.     moveq    #37,d0
  6.     jsr    (-552,a6)        ; OpenLibrary()
  7.     move.l    d0,_DOSBase
  8.     beq.s    .FINISH
  9.  
  10.     xref    _main
  11.     jsr    _main        ; a6 is stored
  12.     move.l    d0,d2
  13.  
  14.     move.l    _DOSBase,a1
  15.     jsr    (-414,a6)        ; CloseLibrary()
  16. .FINISH    move.l    d2,d0
  17.     rts
  18. ****************************************
  19.     xdef    _DOSBase
  20.     xdef    _arg
  21. ****************************************
  22. _DOSBase    dc.l    0
  23. _arg    dc.l    0
  24. ****************************************
  25. DOSName    dc.b    'dos.library',0
  26.